<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('AdminPack/index')}">套餐列表</a></li>
        <li class="active"><a href="javascript:;">{$pack.pack_name}||套餐详情</a></li>
    </ul>
    <form class="js-ajax-form" action="{:url('AdminPack/deleteItem',array('yes'=>1))}" method="post">
        <!--<div class="table-actions">-->
            <!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit">{:lang('EDIT')}</button>-->
        <!--</div>-->
        <div class="table-actions">
            <button class="btn btn-danger btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('AdminPack/infoPost')}" data-subcheck="true" data-msg="您确定更改吗吗？">
                {:lang('EDIT')}
            </button>
        </div>
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="15">
                    <label>
                        <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
                    </label>
                </th>
                <th width="80">ID</th>
                <th>商品名</th>
                <th>价格</th>
                <th width="150">加入时间</th>
                <th width="150">修改时间</th>
                <th width="160">状态</th>
                <th>数量</th>
            </tr>
            </thead>

            <foreach name="pack_item" item="vo">
                <tr>
                    <td>
                        <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
                               value="{$vo.id}" title="ID:{$vo.id}">
                    </td>
                    <td><b>{$vo.id}</b></td>
                    <td>
                        <notempty name="category">
                           {$vo.item_name}
                            <else/>
                            {$vo.item_name}
                        </notempty>
                    </td>
                    <td>{$vo.price}元</td>
                    <td>{:date('Y-m-d H:i',$vo.add_time)}</td>
                    <td>{:date('Y-m-d H:i',$vo.update_time)}</td>
                    <td>
                        <if condition="$vo.mark eq 2000">
                            <span>可用</span>
                            <else/>
                            <span style="color: red;">不可用</span>
                        </if>
                    </td>
                    <td><input type="text" name="pack_item_id[{$vo.pack_item_id}]" value="{$vo.number}"></td>
                </tr>
            </foreach>
        </table>
        <ul class="pagination">{$page|default=''}</ul>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script>

</script>
</body>
</html>